﻿@model smp.ButterflyCakes.Models.ViewModels.Order.ShapeBuilderCalculatedView
<table class="table table-hover">
    <tr>
        <th>
            Size
        </th>
        <th>
            Portions
        </th>
        <th>
            Waste
        </th>
        <th>
        </th>
    </tr>
    @foreach (var item in Model.Items)
    {
        <tr>
            <td>
                <span> Overall baked size : <strong>@item.OverallLength</strong> by <strong>@item.OverallWidth</strong></span><br/>
                <strong>Number of cakes required : @item.Sizes.Count</strong><br/>
                @for (var i = 0; i < item.Sizes.Count; i++)
                {
                    <span class="sizeshtml" length="@item.Sizes[i].Length" width="@item.Sizes[i].Width">Cake @(i + 1) : <strong>@item.Sizes[i].Length</strong> by <strong>@item.Sizes[i].Width</strong> inches<br/></span>
                }
            </td>
            <td>
                @item.Portions
            </td>
            <td>
                @item.Waste %
            </td>
            <td>
                <a href="#" class="btn btn-info calculationSelect" length="@item.OverallLength" width="@item.OverallWidth" portions="@item.Portions" style="color: white">Select</a>
            </td>
        </tr>
    }
</table>
<a href="#" id="calculationcancel" class="btn btn-warning" style="color: white">Cancel</a>